<?php	
if($user->access==2){
?>
		<div id="modifserver">
			<form action="indexpopup.php?page=admin_server&idmodifserver=<?php  print $_GET['idmodifserver'] ; ?>" method="post">
			<table>
			<caption>Modif Servers</caption>
			<?php
			$server = mysql_escape_string($_GET['idmodifserver']);
			$sql_query=mysql_query("Select name,id,address,pin from ".DATABASE_TABLE_SERVER." WHERE id = '$server'");
			while ($query = mysql_fetch_array($sql_query) ){
			?>
				<tr>
					<td>Name</td>
					<td><input type="text" name="mname" value="<?php print $query['name'] ?>" /></td>
				</tr>
				<tr>
					<td>Address</td>
					<td><input type="text" name="maddress" value="<?php print $query['address'] ?>" /></td>
				</tr>
				<tr>
					<td>New Pin</td>
					<td><input type="password" name="mpasswd1" value="" /></td>
				</tr>
				<tr>
					<td>Retype Pin</td>
					<td><input type="password" name="mpasswd2" value="" /></td>
				</tr>
				<tr>
					<td></td>
					<td>
						<input type="hidden" name="mid" value="<?php print $query['id'] ?>" />
						<input type="submit" value="change" />
						<input type="button" value="exit" onclick="reload_page('admin');" />
					</td>
				</tr>
			<?php 
			}
		?>
			</table>
			</form>
		</div>
<?php	
}
?>